'''
Created on 2017年3月16日

@author: Administrator
'''
import json
data = {
    "name":"mark",
    "age":20,
    "status":"AS"
    }
jsonStr = json.dumps(data)
print(jsonStr)
# 将 JSON 对象转换为 Python 字典
data2 = json.loads(jsonStr)
print ("data2['name']: ", data2['name'])

# 写入 JSON 数据
with open('data.json', 'w') as f:
    json.dump(data, f)
# 读取数据
with open('data.json', 'r') as f:
    data = json.load(f)
